package com.qiwx.pigeon.adapter.stock;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.qiwx.pigeon.R;

import java.util.List;

/**
 * @description
 * @Author qiwx
 * @Date 2020/9/28 2:07 PM
 * 库存管理首页
 **/
public class StockManagerAdapter extends BaseQuickAdapter<StockManagerAdapter.StockItemBean, BaseViewHolder> {
    public StockManagerAdapter(int layoutResId, List<StockItemBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, StockItemBean bean) {
        holder.setText(R.id.txt_name, bean.getName());
        holder.setImageResource(R.id.img_icon, bean.getResId());
    }

    public static class StockItemBean {
        String name;
        int resId;
        Class cla;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getResId() {
            return resId;
        }

        public void setResId(int resId) {
            this.resId = resId;
        }

        public Class getCla() {
            return cla;
        }

        public void setCla(Class cla) {
            this.cla = cla;
        }
    }
}
